Video coding method and apparatus, computer-readable medium and electronic device

ABSTRACT

This application belongs to the technical field of communication, and particularly relates to a video coding method and apparatus, a computer-readable medium and an electronic device. The video coding method, executed by the electronic device, includes obtaining historical signal strength information within a historical time period, the historical signal strength information representing a video transmission wireless network signal strength corresponding to each moment of the historical time period; predicting strength information of a next key frame according to the historical signal strength information, the strength information of the next key frame representing a wireless network signal strength for transmitting the next key frame; and determining a target data volume of the next key frame according to the strength information of the next key frame, and performing intraframe coding on the next key frame according to the target data volume.

RELATED APPLICATIONS

This application is a continuation of PCT Application No.PCT/CN2022/0973341, filed on Jun. 7, 2022, which in turn claims priorityto Chinese Patent Application No. 202110883015.7 entitled “VIDEO CODINGMETHOD AND APPARATUS, COMPUTER-READABLE MEDIUM AND ELECTRONIC DEVICE”filed to China Patent Office on Aug. 2, 2021. The two applications areboth incorporated by reference in their entirety.

FIELD OF THE TECHNOLOGY

This application belongs to the technical field of communication, andparticularly relates to a video coding method, a video coding apparatus,a computer-readable medium and an electronic device.

BACKGROUND OF THE DISCLOSURE

One objective of video coding is to eliminate redundant informationexisting among video signals. With the continuous development ofmultimedia digital video applications, since existing transmissionnetwork bandwidths and storage resources cannot support the originalvideo data volume, compressed videos data are suitable for transmissionin a network. Video coding technology has become one of the hot spots inresearches and industrial applications. In addition, with thedevelopment of artificial intelligence and incoming of the 5G era, theincreasing video data volume raises the requirements for a video codingstandard.

However, a video coding method under the 5G private network has theproblem of a long transmission delay.

SUMMARY

An objective of this application is to provide a video coding method andapparatus, a computer-readable medium and an electronic device, whichsolve the technical problems such as transmission delay in the relatedart at least to a certain extent.

Other features and advantages of this application become obvious throughthe following detailed descriptions or partially learned through thepractice of this application.

One aspect of this embodiment of this application provides a videocoding method. The video coding method, executed by the electronicdevice, includes obtaining historical signal strength information withina historical time period, the historical signal strength informationrepresenting a video transmission wireless network signal strengthcorresponding to each moment of the historical time period; predictingstrength information of a next key frame according to the historicalsignal strength information, the strength information of the next keyframe representing a wireless network signal strength for transmittingthe next key frame; and determining a target data volume of the next keyframe according to the strength information of the next key frame, andperforming intraframe coding on the next key frame according to thetarget data volume.

Another aspect of this embodiment of this application provides anon-transitory computer-readable medium, storing a computer programthereon, the computer program, when executed by a processor,implementing the video coding method as in the above technical solution.

Another aspect of this embodiment of this application provides anelectronic device, including: a processor; and a memory, configured tostore executable instructions of the processor; the processor beingconfigured to execute the video coding method as in the above technicalsolution via executing the executable instructions.

In the technical solution provided by this embodiment of thisapplication, the strength information of the next key frame is predictedthrough the historical signal strength information, and the target datavolume of the next key frame is determined according to the predictedstrength information of the next key frame. The target data volume isdetermined in advance before coding of a frame, then coding is performedwithin the next key frame according to the target data volume, andtherefore transmission of the key frame may be completed within oneuplink slot without waiting for one frame period, thereby reducing atransmission delay.

It is to be understood that the above general descriptions and laterdetailed descriptions are merely exemplary and illustrative, and cannotlimit this application.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings herein are incorporated into the specificationand constitute a part of the specification, show embodiments consistentwith this application, and together with the specification, are used toexplain the principle of this application. Apparently, the accompanyingdrawings in the following description are only some embodiments of thisapplication, and for a person of ordinary skill in the art, on thepremise of no creative labor, other accompanying drawings can further beobtained from these accompanying drawings.

FIG. 1 shows a schematic diagram of a 5G network data transmissionprocess.

FIG. 2 shows a block diagram of a system architecture applying atechnical solution of this application.

FIG. 3 shows a step flow of a video coding method provided by thisembodiment of this application.

FIG. 4 shows a step flow of determining a target data volume of a nextkey frame according to strength information of the next key frame in anembodiment of this application.

FIG. 5 shows a step flow of determining a modulation and coding schemeof a next key frame according to strength information of the next keyframe in an embodiment of this application.

FIG. 6 shows a step flow of obtaining a mapping relationship table ofmodulation and coding schemes and strength information in an embodimentof this application.

FIG. 7 shows a step flow of determining a target data volume of a nextkey frame according to comparison of a calculated data volume with anactual data volume in an embodiment of this application.

FIG. 8 shows a step flow of adjusting a calculated data volume in anembodiment of this application.

FIG. 9 shows a step flow of obtaining a load redundancy of a currentnetwork in an embodiment of this application.

FIG. 10 shows a step flow of determining a load redundancy of a currentnetwork according to delay information in an embodiment of thisapplication.

FIG. 11 shows a structural block diagram of a video coding apparatusprovided by this embodiment of this application.

FIG. 12 shows a structural block diagram of a computer system of anelectronic device suitable for implementing this embodiment of thisapplication.

DESCRIPTION OF EMBODIMENTS

Exemplary embodiments will now be described more thoroughly withreference to the accompanying drawings. However, the exemplaryembodiments may be implemented in multiple forms, and are not to beunderstood as being limited to the examples described herein. On thecontrary, providing these embodiments make this application morecomprehensive and complete, and comprehensively communicates the conceptof the exemplary embodiments to a person of skilled in the art.

In addition, the described features, structures or characteristics maybe combined in one or more embodiments in any appropriate manner. In thefollowing descriptions, a lot of specific details are provided to give acomprehensive understanding of the embodiments of this application.However, a person of ordinary skill in the art is to be aware that thetechnical solutions in this application may be implemented without oneor more of the particular details, or another method, unit, apparatus,or step may be used. In other cases, well-known methods, apparatuses,embodiments, or operations are not shown or described in detail, inorder not to obscure the aspects of this application.

The block diagrams shown in the accompanying drawings are merelyfunctional entities and do not necessarily correspond to physicallyindependent entities. That is, the functional entities may beimplemented in a software form, or in one or more hardware modules orintegrated circuits, or in different networks and/or processorapparatuses and/or microcontroller apparatuses.

The flowcharts shown in the accompanying drawings are merely exemplarydescriptions, do not need to include all content and operations/steps,and do not need to be performed in the described orders either. Forexample, some operations/steps may be further divided, while someoperations/steps may be combined or partially combined. Therefore, anactual execution order may change according to an actual case.

With the development of artificial intelligence and incoming of the 5Gera, the increasing video data volume raises the requirements for avideo coding standard. For the same video, the higher the compressionratio of video coding, the higher compression distortion, and the poorerthe video quality experienced by users; and the lower the compressionratio, the higher the cost of video storage and transmission. It isdifficult to find a balance between the two. As such, an adaptive codingtechnology based on network awareness has become a key technology inaudio and video real-time communication.

In a 5G network, uplink and downlink wireless transmission resources areconfigured by utilizing different frames, uplink frames only allowtransmission of uplink data (from terminals to base stations), anddownlink frames only allow transmission of downlink data (from basestations to terminals).

Referring to FIG. 1 , FIG. 1 shows a schematic diagram of a 5G networkdata transmission process. A currently common 5G network has a frameconfiguration of 3D1U, that is, there are three downlink frames, oneuplink frame (U frame) and one special subframe in a time period of 5ms, with a time length of each frame being 1 ms. An uplink data volumethat may be borne by one U frame is specifically related to a signalstrength from a terminal to a base station, scheduling of the basestation, and the like. When I frame data of an uplink video stream ofthe terminal cannot complete transmission on the current U frame, the Iframe data will be scheduled to a next U frame or the one after the nextU frame for uplink transmission, until transmission of all data iscompleted. Referring to FIG. 1 , if only the first part Part1 of the Iframe data is uploaded on the current U frame, a remaining second partPart2 has to be scheduled to the next U frame for uplink transmission,and it needs to wait for another frame period of 5 ms. Therefore, theexisting 5G network has the technical problem of transmission delayduring video transmission.

A method to solve the problem of transmission delay problem is to applyan adaptive coding technology based on network awareness.

Existing adaptive coding mainly includes two methods. The first isdirect feedback adjustment, in which coding parameters are directlyadjusted mainly based on the situations of delay and packet loss fedback by a sending end. The second is predictive adjustment based on arouting congestion model, that is, delay and a packet loss rate of anetwork are predicted for adaptive coding adjustment by utilizing Wienerfiltering or temporal sequence prediction or the like on the basis ofdelay and delay jitter fed back by the sending end. A prediction modelis mainly for a public network scene, and considering that network delayis mainly caused by router forwarding, during router congestion, therewill be large delay jitter, and even packet loss is possible. However,the two adaptive coding methods mentioned above both have problems,specifically, in the method of direct adjustment according to feedbackof a receiving end, encoder adjustment has certain hysteresis, while themethod of predictive adjustment based on the routing congestion modelfails to adapt to a 5G private network scene dominated by 5G radiodelay.

With respect to the above situation, this application provides acorresponding coding method which is designed for the 5G radiocharacteristic and used for relieving the delay problem under the 5Gprivate network scene.

Specifically, referring to FIG. 2 , FIG. 2 shows a block diagram of asystem architecture applying a technical solution of this application.

Referring to FIG. 2 , the system architecture includes a video sendingterminal 210 and a network 220, and the video sending terminal 210 andthe network 220 are in communication connection. The video sendingterminal 210 includes a coding end 211 and a 5G module 212, a videostream is coded through the coding end 211, and the coded video streamcoded through the coding end 211 is sent to the 5G module 212. In orderto lower a transmission delay, during coding at the coding end 211, atarget data volume of a key frame to be transmitted needs to bedetermined first. In order to determine a target data volume of a nextkey frame, the target data volume is specifically determined through avideo coding method as follows.

A key frame of a video is typically an I frame, namely a frame coded viaan intraframe coding technology in video coding, the frame may bedecoded independently without reliance on other frames during decoding,thus the frame is large in size usually and has a difference from aframe coded via an interframe coding technology, and therefore the keyframe of the video is referred to by the I frame in this application.

The video coding method provided by this application is described indetail below in combination with specific embodiments.

Referring to FIG. 3 , FIG. 3 shows a step flow of a video coding methodprovided by this embodiment of this application. The video coding methodmay be executed by an electronic device shown in FIG. 12 . Thisapplication discloses the video coding method, which may mainly includethe following steps S301 to S303.

Step S301: Obtain, by a terminal, historical signal strength informationwithin a historical time period, the historical signal strengthinformation being used for representing a video transmission wirelessnetwork signal strength corresponding to a historical moment within thehistorical time period.

When the terminal performs uplink video stream transmission, the videocoding method of this application starts to be executed in time T1before the arrival of a next intraframe key frame (I frame). Thespecific video coding method is that the terminal obtains the historicalsignal strength information within the historical time period, wherereference signal receiving power (RSRP) represents a network signalstrength, and RSRP received within a time sequence of a nearest timewindow T2 is obtained first.

In some embodiments, the historical time period and a coding moment of anext key frame have a sliding time window with a preset time interval,and the time window will slide forwards over time. Accordingly, a videotransmission network signal strength of a corresponding historicalmoment is obtained conveniently.

Step S302: Predict strength information of the next key frame accordingto the historical signal strength information, the strength informationof the next key frame being used for representing a wireless networksignal strength for transmitting the next key frame.

The strength information of the next key frame is predicted according tothe corresponding historical signal strength information within a presettime window, RSRP of a key frame transmission moment is predictedaccording to an RSRP time sequence value received within the time windowT2, prediction is performed by setting a plurality of corresponding RSRPvalues within one time period, a prediction result obtained accordinglyis relatively stable, and if prediction is performed only with a singlevalue, a situation of jitter will occur. Specifically, prediction of theRSRP of the next key frame may be performed through linear regression,zero-order hold, XGBOOST or a neural network model or the like.

In one embodiment, when the RSRP of the next key frame is predictedthrough the method of linear regression, specifically, first, an RSRPdata set corresponding to historical frames is obtained; then a clusteris generated according to the RSRP data set corresponding to thehistorical frames; a linear regression coefficient is calculatedaccording to the generated cluster at the same time; afterwards, aclustered linear regression function is obtained through the generatedcluster and the linear regression coefficient; afterwards, a linearregression result of K times of clustering is calculated according tothe obtained clustered linear regression coefficient; and finally, theRSRP of the next key frame is obtained according to the obtained linearregression result of the K times of clustering.

In one embodiment, when the RSRP of the next key frame is predictedthrough the method of zero-order hold, specifically, a continuous modelis constructed based on RSRP corresponding to historical frames, thecontinuous model is discretized through a step response invariant methodto obtain a zero-order hold discretized model, and then the discretizedmodel is optimized by introducing calculation time delay to establish azero-order hold discretized model; on the basis of the zero-order holddiscretized model, a calculation time delay item and a disturbance itemare introduced respectively to obtain a delay model and a disturbancemodel; on the basis of the disturbance model, an extended state observeris designed by adopting a state space method; a zero-order holddiscretized state equation considering disturbance is established, and adisturbance state observer is designed based on this zero-order holddiscretized state equation to estimate disturbance; and givingconsideration to system robustness and a system dynamic property, aproper RSRP parameter is selected by adopting a direct zero-poleconfiguration method, so that the RSRP of the next key frame isobtained.

In one embodiment, when the RSRP of the next key frame is predictedthrough an XGBOOST algorithm, specifically, RSRP corresponding tohistorical frames is obtained, and a training data set is trained forlearning by utilizing XGBOOST with the RSRP corresponding to thehistorical frames as a historical feature and with features affectingRSRP data and the historical feature as the training data set ofXGBOOST, so that a prediction model is obtained; and RSRP of predictedtime is predicted with the prediction model to obtain an RSRP predictedvalue of the next key frame.

In one embodiment, when the RSRP of the next key frame is predictedthrough a neural network model, specifically, continuous video framesare selected as training samples, frame-to-frame differences of thetraining samples are extracted, with the frame-to-frame differences asan input to an encoder in a generator model, neural network weights ofthe encoder and a decoder are obtained by training based on a lossfunction, and a predicted frame at the time when a value of the lossfunction is the minimum is obtained by solving, so that an RSRPpredicted value of the next key frame is obtained.

Step S303: Determine a target data volume of the next key frameaccording to the strength information of the next key frame, and performintraframe coding on the next key frame according to the target datavolume.

Since an uplink data volume that may be borne by one uplink frame isspecifically related to a signal strength from a terminal to a basestation, the target data volume of the next key frame may be obtainedaccording to the predicted strength information of the next key frame,and intraframe coding of the next key frame is performed through thedetermined target data volume.

Since a video stream includes multiple frames, the video stream comesframe by frame when transmitted, before the next key frame is to becoded, a coding size of this key frame is calculated in advance, and thecoding size of this key frame calculated in advance refers to the targetdata volume of the next key frame. After the target data volume of thenext key frame is determined, a value of a coding rate of an encoder isset, and then when this video frame is coded, the size of the coded keyframe is a preset coding size. The target data volume at the momentenables transmission of the key frame to be completed within one uplinkslot, thereby lowering the transmission delay.

In the technical solution provided by this embodiment of thisapplication, the strength information of the next key frame is predictedthrough the historical signal strength information, and the target datavolume of the next key frame is determined according to the predictedstrength information of the next key frame. The target data volume isdetermined in advance before coding of the next key frame, thenintraframe coding is performed on the next key frame according to thetarget data volume, and therefore transmission of the key frame may becompleted within one uplink slot without waiting for one frame period,thereby reducing the transmission delay. In this application, a bit ofimage quality is sacrificed in exchange for the shorter delay, such thatthe transmission rate of the video stream is greatly increased.

By adaptively adjusting the size of the key frame, transmission of thekey frame may be completed within an uplink slot of one 5G frame withoutwaiting for another frame period of 5 ms. A coding range of a 1080P keyframe is about 50 KB to 200 KB, and a data volume capable of beingtransmitted by one 5G uplink slot with no load is about 125 KB. It isfeasible to perform adaptive transmission of the key frame according tothe network state.

Referring to FIG. 4 , FIG. 4 shows a step flow of determining the targetdata volume of the next key frame according to the strength informationof the next key frame in an embodiment of this application. In someembodiments, step S303 that the target data volume of the next key frameis determined according to the strength information of the next keyframe may mainly include the following steps S401 to S403.

Step S401: Determine a modulation and coding scheme of the next keyframe according to the strength information of the next key frame.

In wireless communication, a modulation and coding scheme (MCS) isgenerally used for describing selection of channel coding andconstellation modulation during transmission in a physical layer.Generally, sent data will be processed via the MCS, and different MCSsmay have different coding rates, thereby influencing a sent data volumethat can be borne actually on the same radio resource block. In order topre-determine the target data volume before coding of the next keyframe, the modulation and coding scheme corresponding to the next keyframe needs to be obtained first, and the modulation and coding schemeof the next key frame is determined through the strength information ofthe next key frame.

Step S402: Calculate the data volume of the next key frame according tothe modulation and coding scheme of the next key frame.

As different modulation and coding schemes may have different codingrates and the different coding rates influence the sent data volume thatcan be borne actually on the same radio resource block, a correspondingcoding rate is obtained by obtaining the modulation and coding scheme ofthe next key frame, and the data volume of the next key frame iscorrespondingly calculated through the coding rate.

Step S403: Determine the target data volume of the next key frameaccording to comparison of the calculated data volume with an actualdata volume.

In order to guarantee that a video stream can be transmitted normallywhile lowering the transmission delay, comparison is required ratherthan directly using the calculated data volume as the target data volumeof the next key frame, the calculated data volume and the actual datavolume of the video stream are compared, and a proper data volume isselected as the target data volume, so that it is guaranteed that thevideo stream can be transmitted normally while lowering the transmissiondelay, without greatly lowering the video quality.

Accordingly, the target data volume of the next key frame is estimatedthrough the strength information of the next key frame, the target datavolume is pre-determined before coding of the next key frame, thecalculated data volume needs to be compared with the actual data volumewhen the target data volume is determined, and the relatively properdata volume is selected as the target data volume, so that it isguaranteed that the video stream can be transmitted normally whilelowering the transmission delay.

Referring to FIG. 5 , FIG. 5 shows a step flow of determining themodulation and coding scheme of the next key frame according to thestrength information of the next key frame in an embodiment of thisapplication. In some embodiments, step S401 that the modulation andcoding scheme of the next key frame is determined according to thestrength information of the next key frame may mainly include thefollowing steps S501 to S502.

Step S501: Obtain, by the terminal, a mapping relationship table ofmodulation and coding schemes and strength information.

The mapping relationship table of the modulation and coding schemes andthe strength information is a mapping relationship table of MCSs andRSRP, which describes MCS levels corresponding to different RSRP bands.

Rules for determining MCS tables may be pre-configured, such that in anaccess process of the video sending terminal, the MCS tables used bychannels may be determined according to the pre-configured rules. Forexample, the pre-configured rules may be determining the MCS tables usedby all or part of the channels in the access process of the videosending terminal according to a current RSRP measured value.

As the current RSRP measured value of the video sending terminal mayreflect the current user capability of the video sending terminal andcurrent actual transmission performance of the video sending terminal,the MCS tables used by the channels in the random access process may bedetermined according to the current RSRP measured value to better meetcurrent real-time performance requirements of the video sendingterminal. Therefore, the video sending terminal may measure the RSRP inthe access process to determine the MCS tables used by the channels inthe access process according to a range where the current RSRP measuredvalue is located. Further, after measuring the current RSRP measuredvalue, the video sending terminal may send the current RSRP measuredvalue to a base station to make the base station determine the MCStables, matching the current RSRP measured value, used by the channels,such that the mapping relationship table of the MCSs and the RSRP may beobtained.

Step S502: Determine the modulation and coding scheme of the next keyframe by looking up the mapping relationship table of the modulation andcoding schemes and the strength information according to the strengthinformation of the next key frame.

The modulation and coding scheme corresponding to the strengthinformation of the next key frame is obtained by looking up the mappingrelationship table of the modulation and coding schemes and the strengthinformation. Specifically, the mapping relationship table of themodulation and coding schemes and the strength information is themapping relationship table of the MCSs and the RSRP, and as for thecorrespondence of the MCSs and the RSRP, generally, RSRP in a certaininterval corresponds to one MCS because the MCSs are discrete and theRSRP is continuous, so that one interval is established to correspond toone MCS.

After new RSRP, namely the strength information of the next key frame,is obtained, comparison is made. Since all historical RSRP is classifiedinto corresponding MCSs, if the average distance between the new RSRPand all the RSRP in an MCS is the smallest, then the new RSRP belongs tothat MCS, that is, the new RSRP has the smallest distance from the RSRPmatching the historical MCSs. Assuming that the MCSs are 0 and 1 andthere are much RSRP, the historical RSRP either corresponds to the MCSbelonging to 0 or the MCS belonging to 1, the MCS being 0 corresponds tohistorical values of multiple RSRP, the MCS being 1 also corresponds tohistorical values of multiple RSRP, then, to judge which MCS the newRSRP belongs to, whether the new RSRP has the smallest average distancefrom all the historical RSRP corresponding to the MCS being 0 or all thehistorical RSRP corresponding to the MCS being 1 is judged, and if thenew RSRP has the smallest average distance from all the RSRPcorresponding to the MCS being 0, the new RSRP is classified into theclass that the MCS is equal to 0, so that the modulation and codingscheme of the next key frame is determined, and the step that themodulation and coding scheme of the next key frame is determined bylooking up the mapping relationship table of the modulation and codingschemes and the strength information according to the strengthinformation of the next key frame is achieved.

Accordingly, the method of looking up the table is conducive todetermining the modulation and coding scheme of the next key frameaccording to the obtained strength information. In addition, adjustingthe coding scheme based on network awareness of the video sendingterminal does not need to wait for feedback of a receiving end, soadjustment is in time relatively.

Referring to FIG. 6 , FIG. 6 shows a step flow of obtaining the mappingrelationship table of the modulation and coding schemes and the strengthinformation in an embodiment of this application. In some embodiments,as for obtaining the mapping relationship table of the modulation andcoding schemes and the strength information, specifically, step S501:Obtain the mapping relationship table of the modulation and codingschemes and the strength information, which may mainly include thefollowing steps S601 to S603.

Step S601: Obtain, by the terminal, historical modulation and codingschemes allocated by the base station and the historical signal strengthinformation in real time, and use coded information corresponding to thehistorical modulation and coding schemes as a classification label, thehistorical modulation and coding schemes being used for representingmodulation and coding schemes corresponding to historical moments.

Step S602: Cluster the historical signal strength information accordingto the coded information classification label to obtain a clusteringclassifier.

Step S603: Input strength values in a historical signal strengthinformation value distribution interval into the clustering classifierto obtain classification information corresponding to the codedinformation classification label to obtain the mapping relationshiptable of the modulation and coding schemes and the strength information.

The terminal records MCS information allocated by the base station andRSRP information during recent uplink transmission obtained from a 5Gmodule to establish the mapping relationship table of the MCSs and theRSRP. As for a specific table establishment method, a clustering methodmay be adopted, such that historical real MCSs have the smallest averagedistance from the MCSs obtained by looking up the mapping relationshiptable utilizing the RSRP.

Accordingly, obtaining the modulation and coding schemes allocated bythe base station and the strength information is conducive toestablishing the mapping relationship table of the modulation and codingschemes and the strength information.

If the terminal cannot obtain the MCS information allocated by the basestation from the 5G module in real time, offline measurement may beconducted by utilizing the measures such as simulation or testing, andthe mapping relationship table of the MCSs and the RSRP is establishedin advance and stored in the terminal.

Referring to FIG. 7 , FIG. 7 shows a step flow of determining the targetdata volume of the next key frame according to comparison of thecalculated data volume with the actual data volume in an embodiment ofthis application. In some embodiments, step S403 that the target datavolume of the next key frame is determined according to comparison ofthe calculated data volume and the actual data volume may mainly includethe following steps S701 to S702.

Step S701: Adjust, by the terminal, the calculated data volume.

The terminal adjusts the calculated data volume after calculating thedata volume, and specifically, adjustment is performed through acoefficient to ensure that the obtained data volume can be transmittednormally.

Step S702: Compare the adjusted data volume with the actual data volume,and select a data volume with a smaller value as the target data volumeof the next key frame.

The adjusted data volume is compared with the actual data volume of thevideo stream, and if the adjusted data volume is less than the actualdata volume, the adjusted data volume is selected as the target datavolume of the next key frame, and intraframe coding is performed on thenext key frame according to the target data volume. If the actual datavolume is less than the adjusted data volume, the actual data volume isselected as the target data volume of the next key frame, and intraframecoding is performed on the next key frame according to the target datavolume.

Accordingly, the adjusted data volume and the actual data volume arecompared, the data volume with the smaller value is selected as thetarget data volume of the next key frame, selecting the smaller datavolume as the target data volume may greatly lower the transmissiondelay, and additionally, it is guaranteed that the video stream can betransmitted normally while the transmission delay is lowered.

In some embodiments, after the target data volume of the next key frameis determined, further adjustment may be performed through qualityparameters to reduce a bit rate while guaranteeing the video quality.Specifically, a current quality parameter value is obtained; and whetheran output bit rate corresponding to the current quality parameter valuemeets the requirement of a preset threshold value is judged, if yes, noadjustment is required, and if not, the current quality parameter valueis adjusted as a target quality parameter value.

The quality parameter (QP) is one of main parameters for performingvideo coding. When the minimum value 0 of the QP is used, it representsthat qualification of a video is the finest, and on the contrary, whenthe maximum value of the QP is used, it represents that qualification ofthe video is the roughest. Typically, in order to enable video contentsto meet the requirements of transmitting and playing on the Internet,video content providers such as a video website need to perform atranscoding operation on original videos. Video transcoding is nearlythe basis of all Internet video services, including livestreaming,on-demand unicasting and the like. The goal of video transcoding issimple, namely obtaining smooth and clear video data. However,smoothness and clarity are two contradictory requirements. The lower thebit rate is, the better the smoothness is, and on the contrary, clarityrequires the higher bit rate. Video transcoding needs to give priorityto smooth playing. On this basis, the picture quality and a compressionratio of transcoding are improved as much as possible. The bit raterefers to a data bit number conveyed within unit time during datatransmission, and typically uses kbps as the unit, namely “kilobit persecond”. Typically, for one video, a picture is not clear when the bitrate is too low; and when the bit rate is too high, the video cannot besmoothly played on a network.

When the video is coded by adopting the current quality parameter value,and an average bit rate or instantaneous bit rate of a video outputafter coding fails to meet preset requirements, the current qualityparameter value may be adjusted to obtain the target quality parametervalue. Typically, the bit rate of the output video is inverselyproportional to a quality parameter value adopted by a video coder, thelarger the quality parameter value, the smaller the bit rate of thevideo output after transcoding, and the smaller the quality parametervalue, the larger the bit rate of the video output after transcoding, sothat the quality parameter value of the video coder may be adjustedaccording to a comparison result of the bit rate of the video outputafter transcoding with the preset requirements. For example, when thebit rate of the video output after transcoding is greater than thepreset requirements, it shows that the current quality parameter valueis small and may be increased by a certain value correspondingly toobtain the target quality parameter value.

Referring to FIG. 8 , FIG. 8 shows a step flow of adjusting thecalculated data volume in an embodiment of this application. In someembodiments, step S701 of adjusting the calculated data volume maymainly include the following steps S801 to S802.

Step S801: Obtain, by the terminal, a load redundancy of a currentnetwork.

The load redundancy of the current network represents a state of thecurrent network, and by obtaining the state of the current network,subsequent adjustment of the data volume is facilitated.

The load redundancy of the current network may be dynamically adjustedaccording to a packet loss condition and an estimated result of anetwork bandwidth.

Step S802: Obtain the adjusted data volume according to a product of thecalculated data volume, the load redundancy, a preset protection ratioand a preset adjusting coefficient.

With respect to setting of the protection ratio P, for example, amaximum target data volume is 100 k, as a deviation exists in aprediction process, in order to prevent that data cannot be transmittednormally due to some accidents, by setting a protection ratio, such as90%, the target data volume is lowered to 100*90% for transmission bysetting the protection ratio, the target data volume may be transmittednormally even when there is a deviation during prediction, and thussetting the protection ratio is to lower the influence of the deviationon a result at last, thereby eliminating the influence of the predictiondeviation.

Accordingly, considering the load redundancy of the current network isconducive to obtaining the adjusted data volume.

In some embodiments, when the next key frame uses forward errorcorrection coding, the preset adjusting coefficient is 1/(1+R), where Rrepresents a redundancy rate of forward error correction coding; and

when the next key frame does not use forward error correction coding,the preset adjusting coefficient is 1.

As the method of forward error correction coding is an FEC codingmethod, and when the next key frame is coded, a product will be larger,adjustment is performed through the preset adjusting coefficient toobtain a target data size that can be transmitted.

Accordingly, by adopting different coding methods, the preset adjustingcoefficient is set to be different to adapt to different applicationscenarios.

Referring to FIG. 9 , FIG. 9 shows a step flow of obtaining the loadredundancy of the current network in an embodiment of this application.In some embodiments, step S801 of obtaining the load redundancy of thecurrent network may mainly include the following steps S901 to S902.

Step S901: Obtain delay information of a historical key frame.

The current network state is determined by using the delay informationof the historical key frame as feedback.

Step S902: Determine the load redundancy of the current networkaccording to the delay information.

The load redundancy of the current network is obtained through the delayinformation of the historical key frame, which is conducive to obtaininga relatively accurate load redundancy of the current network andobtaining a relatively accurate target data volume.

In some embodiments, the load redundancy of the current network isdetermined according to the delay information, that is, the videosending terminal performs real-time statistics on a network transmissionstate and dynamically adjusts the load redundancy in real time,specifically including: counting network round-trip time of N continuousdata packets within a period of time to obtain an initial average valueand a standard deviation of data packet round-trip time within theperiod of time; determining a time threshold value by counting theround-trip time of the continuous data packets within the period oftime; obtaining round-trip time of a current single data packettransmitted by a sending end; comparing the round-trip time of thecurrent data packet with the time threshold value obtained by countingthe transmission delay of the continuous data packets before that datapacket; judging, if a value of the round-trip time of the current datapacket is greater than or equal to the time threshold value, whichrepresents that the round-trip time of the data packet is too long, thatthe current data packet is lost in the network transmission process,thus recording one time of packet loss; using a sliding window method ifthe value of the round-trip time of the current data packet is less thanthe time threshold value, which represents that the round-trip time ofthe data packet is normal, in which a window size is set as M, everytime confirmation information of a new data packet is obtained, earliestround-trip time in a window is removed, a new result is added into thewindow, and the round-trip time of the data packets and the losscondition of the data packets are monitored in real time, so that apacket loss rate result is obtained; obtaining an average value and astandard deviation of the data packet loss ratio within the period oftime according to the statistics of packet loss rates of N times of datapacket transmission; calculating a reference ratio for adjusting theload redundancy of the current network; adjusting redundancy of thevideo sending terminal according to the reference ratio for adjustingthe redundancy, and updating the number of data packets and the numberof redundancy packets; and using the sliding window method, in which thewindow size is set as M, every time a new packet loss rate is obtained,earliest packet loss rate data in the window are removed, a new resultis added into the window, and the network condition is monitored in realtime.

Accordingly, the network condition is accurately judged and the networkcondition within a short period is predicted by adopting real-timecontinuous statistics based on the video sending terminal, which is usedas the basis for dynamically adjusting the load redundancy. Finally,consumption of the network bandwidth by redundancy packets is reducedwhile a system decouples the network packet loss phenomenon, and thepurposes of improving the network utilization and sending efficiency areachieved.

In addition, the network condition is estimated in real time byperforming statistical operation on the packet loss situation based onthe video sending terminal, the network packet loss condition is countedat the video sending terminal, and latency of a statistical processcaused by a feedback process of a receiving end is reduced. Atransmission result of the data packets may be obtained within oneround-trip time by counting the packet loss rate through the videosending terminal, a packet loss statistical result is obtained when apacket loss rate counting period is ended, whereas the receiving endrequires an additional feedback and handling process. In addition, theaverage value and the standard deviation for verification are updatedthrough the sliding window method in the online statistical verificationprocess, so that the statistical process is timely. Besides, comparedwith a transmission method in which a video frame is the unit and thetotal numbers of data packets in each group are different after coding,stable and efficient transmission of the data packets may be achievedthrough a transmission method with a constant rate, on the one hand, thedata volume entering the network within unit time may be guaranteed tobe constant, and on the other hand, latency generated by different datapacket sending intervals is lowered.

In some embodiments, step S901 of obtaining the delay information of thehistorical key frame includes:

using delay information fed back by the receiving end as the delayinformation of the historical key frame, or using delay information,obtained via monitoring, of clearing transmitting cache region as thedelay information of the historical key frame.

Accordingly, the delay information may be obtained based on the delayfed back by the receiving end or the delay information of the clearingtransmitting cache region observed in the 5G module, the delayinformation is conveniently obtained, and thus the obtained delayinformation is more accurate in data volume.

Referring to FIG. 10 , FIG. 10 shows a step flow of determining the loadredundancy of the current network according to the delay information inan embodiment of this application. In some embodiments, step S902 ofdetermining the load redundancy of the current network according to thedelay information may mainly include the following steps S1001 to S1003.

Step S1001: Set an initial load redundancy.

The initial load redundancy is set as a default value, such as 80%.

Step S1002: Lower the load redundancy according to a first preset steplength when a time window of the delay information is greater than atime window of a preset delay, and use a final load redundancy obtainedafter adjustment as the load redundancy of the current network.

For example, when the time window of the delay information is greaterthan the time window of the preset delay, such as a 5 ms difference, theload redundancy is lowered according to a certain step length, and whenthe time window of the delay information is equal to the time window ofthe preset delay after adjustment, the final load redundancy obtainedafter adjustment is used as the load redundancy of the current network.

Step S1003: Increase the load redundancy according to a second presetstep length when the time window of the delay information is less thanthe time window of the preset delay, and use a final load redundancyobtained after adjustment as the load redundancy of the current network,where the first preset step length is greater than the second presetstep length.

The load redundancy is increased according to the second preset steplength when the time window of the delay information is less than thetime window of the preset delay, such as a 5 ms difference, and when thetime window of the delay information is equal to the time window of thepreset delay after adjustment, the final load redundancy obtained afteradjustment is used as the load redundancy of the current network.

Accordingly, the load redundancy is adjusted by setting the differentstep lengths according to the different delay information to achieverapid adjustment of the load redundancy, and the load redundancy isdynamically adjusted to obtain the relatively accurate load redundancyof the current network, which is conducive to obtaining the relativelyaccurate target data volume.

In some embodiments, the time window of the preset delay is determinedaccording to a forward reference frame transmission delay, or isdetermined according to an empty load network environment test value.

A group of pictures (GOP) refers to a group of continuous pictures in avideo, which is used as a frame group in video coding. In low-delayvideo transmission, typically in one GOP, the first frame after codingis an I frame, subsequent frames are forward reference frames, namely Pframes, and the time window of the preset delay may be determinedaccording to delays of the P frames. In addition, the window of thepreset delay may also be set according to a network environmentcorresponding to no load.

Accordingly, in combination with the actual delay situation, the timewindow of the preset delay is set more reasonably.

In some embodiments, the method further includes: obtaining, by theterminal, one media frame, placing the obtained media frame into abuffering queue, determining a total number of media frames in thebuffering queue and a total length of media frames sent from previouscalculation of a bandwidth to current time, and calculating a currentbandwidth and a current network congestion grade according to the totalnumber of the media frames and the total length of the media frames;judging a code stream adjusting type according to the current bandwidthand the network congestion grade, and calculating a coding adjustmentparameter, in which not only is calculation of an adjusted code streamvalue needed, but also calculation of an adjusted frame frequency valueis needed, accordingly, a frame frequency is correspondingly loweredwhen a code stream is reduced, because when the code stream isrelatively low, an over-high frame rate has little significance,lowering the frame frequency according to a ratio may effectively reducethe problem that the picture quality is poorer due to reduction of thecode stream, when the adjustment type of the code stream is reduction, acode stream value that requires to be reduced is calculated based on thecurrent bandwidth, and thus the maximum bandwidth utilization is reachedas much as possible while smoothness is guaranteed; and finally,adjusting, by the terminal, a coding configuration based on thecalculated coding adjustment parameter. Accordingly, the codingconfiguration is adjusted adaptive to the bandwidth, sending of invalidmedia frames is reduced, and the smoothness is improved.

Although the steps of the method in this application are described in aspecific order in the accompanying drawings, this does not require orimply that these steps must be performed in the specific order, or thatall the steps shown must be performed to achieve the desired results.Additionally, or alternatively, some steps may be omitted, a pluralityof steps may be combined into one step for execution, and/or one stepmay be decomposed into a plurality of steps for execution, and the like.

An apparatus embodiment of this application is introduced below, whichmay be used for executing the video coding method in the aboveembodiments of this application. FIG. 11 shows a structural blockdiagram of a video coding apparatus provided by this embodiment of thisapplication. As shown in FIG. 11 , the video coding apparatus 1100includes:

-   an obtaining module 1110, configured to obtain historical signal    strength information within a historical time period, the historical    signal strength information being used for representing a video    transmission wireless network signal strength corresponding to each    historical moment within the historical time period;-   a predicting module 1120, configured to predict strength information    of a next key frame according to the historical signal strength    information, the strength information of the next key frame being    used for representing a wireless network signal strength for    transmitting the next key frame; and-   a determining module 1130, configured to determine a target data    volume of the next key frame according to the strength information    of the next key frame, and perform intraframe coding on the next key    frame according to the target data volume.

In some embodiments, based on the above technical solution, thedetermining module 1130 includes:

-   a first determining unit, configured to determine a modulation and    coding scheme of the next key frame according to the strength    information of the next key frame;-   a calculating unit, configured to calculate a data volume of the    next key frame according to the modulation and coding scheme of the    next key frame; and-   a second determining unit, configured to determine the target data    volume of the next key frame according to comparison of the    calculated data volume with an actual data volume.

In some embodiments, based on the above technical solution, the firstdetermining unit is configured to obtain a mapping relationship table ofmodulation and coding schemes and strength information; and determinethe modulation and coding scheme of the next key frame by looking up themapping relationship table of the modulation and coding schemes and thestrength information according to the strength information of the nextkey frame.

In some embodiments, based on the above technical solution, the firstdetermining unit is configured to obtain historical modulation andcoding schemes allocated by a base station and the historical signalstrength information in real time, and use coded informationcorresponding to the historical modulation and coding schemes as aclassification label, the historical modulation and coding schemes beingused for representing modulation and coding schemes corresponding tohistorical moments; cluster the historical signal strength informationaccording to the coded information classification label to obtain aclustering classifier; and input strength values in a historical signalstrength information value distribution interval into the clusteringclassifier to obtain classification information corresponding to thecoded information classification label to obtain the mappingrelationship table of the modulation and coding schemes and the strengthinformation.

In some embodiments, based on the above technical solution, the seconddetermining unit is configured to adjust the calculated data volume; andcompare the adjusted data volume with the actual data volume, and selecta data volume with a smaller value as the target data volume of the nextkey frame.

In some embodiments, based on the above technical solution, the seconddetermining unit is configured to obtain a load redundancy of a currentnetwork; and obtain the adjusted data volume according to a product ofthe calculated data volume, the load redundancy, a preset protectionratio and a preset adjusting coefficient.

In some embodiments, based on the above technical solution, the seconddetermining unit is configured for the following: when the next keyframe uses forward error correction coding, the preset adjustingcoefficient is 1/(1+R), where R represents a redundancy rate of forwarderror correction coding; and when the next key frame does not useforward error correction coding, the preset adjusting coefficient is 1.

In some embodiments, based on the above technical solution, the seconddetermining unit is configured to obtain delay information of ahistorical key frame; and determine the load redundancy of the currentnetwork according to the delay information.

In some embodiments, based on the above technical solution, the seconddetermining unit is configured to use delay information fed back by areceiving end as the delay information of the historical key frame, oruse delay information, obtained via monitoring, of clearing transmittingcache region as the delay information of the historical key frame.

In some embodiments, based on the above technical solution, the seconddetermining unit is configured to set an initial load redundancy; lowerthe load redundancy according to a first preset step length when a timewindow of the delay information is greater than a time window of apreset delay, and use a final load redundancy obtained after adjustmentas the load redundancy of the current network; and increase the loadredundancy according to a second preset step length when the time windowof the delay information is less than the time window of the presetdelay, and use a final load redundancy obtained after adjustment as theload redundancy of the current network; where the first preset steplength is greater than the second preset step length.

In some embodiments, based on the above technical solution, in thesecond determining unit, the time window of the preset delay isdetermined according to a forward reference frame transmission delay, oris determined according to an empty load network environment test value.

In some embodiments, based on the above technical solution, in theobtaining module, the historical time period and a coding moment of thenext key frame have a sliding time window with a preset time interval.

Specific details of the video coding apparatus provided in theembodiments of this application have been described in detail in thecorresponding method embodiment, which will not be repeated here.

FIG. 12 shows a structural block diagram of a computer system of anelectronic device used for implementing this embodiment of thisapplication.

The computer system 1200 of the electronic device shown in FIG. 12 isonly an example, and should not limit the function and scope of use ofthis embodiment of this application.

As shown in FIG. 12 , the computer system 1200 includes a centralprocessing unit (CPU) 1201, which may execute various appropriateactions and processing according to programs stored in a read-onlymemory (ROM) 1202 or programs loaded from a storage part 1208 onto arandom access memory (RAM) 1203. In random access memory 1203, variousprograms and data required for system operations are further stored. Thecentral processing unit 1201, the read-only memory 1202 and the randomaccess memory 1203 are connected with one another through bus 1204. Aninput/output interface (I/O interface) 1205 is also connected to the bus1204.

The following components are connected to the input/output interface1205: an input part 1206 including a keyboard, a mouse and the like; anoutput part 1207 including a cathode ray tube (CRT), a liquid crystaldisplay (LCD), a loudspeaker and the like; a storage part 1208 includinga hard disk and the like; and a communication part 1209 including alocal area network card, a network interface card of a modem and thelike. The communication part 1209 performs communication processing byusing a network such as the Internet. A driver 1210 is further connectedto the input/output interface 1205 as required. A removable medium 1211,such as a magnetic disk, an optical disk, a magneto-optical disk and asemiconductor memory, are installed on the driver 1210 as required, sothat computer programs read from it can be installed into the storagepart 1208 as required.

In particular, according to this embodiment of this application, theprocess described in the flow chart of each method can be implemented asa computer software program For example, this embodiment of thisapplication includes a computer program product, the computer programproduct includes a computer program carried on a computer-readablemedium, and the computer program includes program codes used forperforming the methods shown in the flowcharts. In such an embodiment,the computer program may be downloaded from the network through thecommunication part 1209 and installed, and/or installed from theremovable medium 1211. The computer program, when executed by thecentral processing unit 1201, executes various functions defined in thesystem of this application.

The computer-readable medium shown in this embodiment of thisapplication may be a computer-readable signal medium or acomputer-readable storage medium or any combination of the two. Thecomputer-readable storage medium may be, for example, but is not limitedto, an electrical, magnetic, optical, electromagnetic, infrared, orsemiconductor system, apparatus, or device, or any combination of theabove. More specific examples of the computer-readable storage mediummay include but are not limited to: electrical connections with one ormore wires, a portable computer magnetic disk, a hard disk, a randomaccess memory (RAM), a read-only memory (ROM), an erasable programmableread only memory (EPROM), a flash memory, an optical fiber, a portablecompact disc read-only memory (CD-ROM), an optical storage device, amagnetic storage device or any suitable combination of the above. Inthis application, the computer-readable storage medium may be anytangible medium containing or storing a program, and the program may beused by or used in combination with an instruction execution system, anapparatus, or a device. In this application, the computer-readablesignal medium may include a data signal propagated in a baseband or aspart of a carrier wave, in which a computer-readable program code iscarried. A data signal propagated in such a way may assume a pluralityof forms, including, but not limited to, an electromagnetic signal, anoptical signal, or any appropriate combination thereof. Thecomputer-readable signal medium may also be any computer-readable mediumother than the computer-readable storage medium that may send,propagate, or transmit a program for use by or in combination with aninstruction execution system, an apparatus, or a device. The programcodes contained on the computer-readable medium may be transmitted byany suitable medium, including but not limited to wireless, wired, etc.,or any suitable combination of the above.

The flow charts and block diagrams in the accompanying drawingsillustrate possible system architectures, functions and operations thatmay be implemented by a system, a method, and a computer program productaccording to various embodiments of this application. In this regard,each box in a flow chart or a block diagram may represent a module, aprogram segment, or a part of code. The module, the program segment, orthe part of code includes one or more executable instructions used forimplementing designated logic functions. In some alternativeembodiments, functions marked in the blocks may also occur in an orderdifferent from that marked in the accompanying drawings. For example,actually two boxes shown in succession may be performed basically inparallel, and sometimes the two boxes may be performed in a reversesequence. This is determined by a related function. Each box in a blockdiagram and/or a flow chart and a combination of boxes in the blockdiagram and/or the flow chart may be implemented by using a dedicatedhardware-based system configured to perform a specified function oroperation, or may be implemented by using a combination of dedicatedhardware and a computer instruction.

Although a plurality of modules or units of a device configured toperform actions are discussed in the foregoing detailed description,such division is not mandatory. Actually, according to the embodimentsof this application, the features and functions of two or more modulesor units described above may be specifically implemented in one moduleor unit. On the contrary, the features and functions of one module orunit described above may be further divided to be embodied by aplurality of modules or units.

According to the foregoing descriptions of the embodiments, a personskilled in the art may readily understand that the embodiments describedherein may be implemented by using software, or may be implemented bycombining software and necessary hardware. Therefore, the technicalsolutions of the embodiments of this application may be implemented in aform of a software product. The software product may be stored in anon-volatile storage medium (which may be a CD-ROM, a USB flash drive, aremovable hard disk, or the like) or on the network, including severalinstructions for instructing a computing device (which may be a personalcomputer, a server, a touch terminal, a network device, or the like) toperform the methods according to the embodiments of this application.

Other embodiments of this application will be apparent to a person ofskilled in the art from consideration of the specification and practiceof the invention disclosed herein. This application is intended to coverany variations, uses, or adaptations of this application following thegeneral principles thereof and including such departures from thisapplication as come within known or customary practice in the art.

It is to be understood that this application is not limited to theprecise structures described above and shown in the accompanyingdrawings, and various modifications and changes can be made withoutdeparting from the scope of this application. It is intended that thescope of this application is only limited by the appended claims.

What is claimed is:
 1. A video coding method, executed by an electronicdevice, comprising: obtaining historical signal strength informationwithin a historical time period, the historical signal strengthinformation representing a video transmission wireless network signalstrength corresponding to each moment of the historical time period;predicting strength information of a next key frame according to thehistorical signal strength information, the strength information of thenext key frame representing a wireless network signal strength fortransmitting the next key frame; and determining a target data volume ofthe next key frame according to the strength information of the next keyframe, and performing intraframe coding on the next key frame accordingto the target data volume.
 2. The video coding method according to claim1, wherein the determining a target data volume of the next key frameaccording to the strength information of the next key frame, comprises:determining a modulation and coding scheme of the next key frameaccording to the strength information of the next key frame; calculatinga data volume of the next key frame according to the modulation andcoding scheme of the next key frame; and determining the target datavolume of the next key frame according to comparison of the calculateddata volume with an actual data volume.
 3. The video coding methodaccording to claim 2, wherein the determining a modulation and codingscheme of the next key frame according to the strength information ofthe next key frame, comprises: obtaining a mapping relationship table ofmodulation and coding schemes and strength information; and determiningthe modulation and coding scheme of the next key frame by looking up themapping relationship table of the modulation and coding schemes and thestrength information according to the strength information of the nextkey frame.
 4. The video coding method according to claim 3, wherein theobtaining a mapping relationship table of modulation and coding schemesand strength information, comprises: obtaining historical modulation andcoding schemes allocated by a base station and the historical signalstrength information in real time, and using coded informationcorresponding to the historical modulation and coding schemes as aclassification label, the historical modulation and coding schemesrepresenting modulation and coding schemes corresponding to historicalmoments; clustering the historical signal strength information accordingto the coded information classification label to obtain a clusteringclassifier; and inputting strength values in a historical signalstrength information value distribution interval into the clusteringclassifier to obtain classification information corresponding to thecoded information classification label to obtain the mappingrelationship table of the modulation and coding schemes and the strengthinformation.
 5. The video coding method according to claim 2, whereinthe determining the target data volume of the next key frame accordingto comparison of the calculated data volume with an actual data volume,comprises: adjusting the calculated data volume; and comparing theadjusted data volume with the actual data volume, and selecting a datavolume with a smaller value as the target data volume of the next keyframe.
 6. The video coding method according to claim 5, wherein theadjusting the calculated data volume, comprises: obtaining a loadredundancy of a current network; and obtaining the adjusted data volumeaccording to a product of the calculated data volume, the loadredundancy, a preset protection ratio and a preset adjustingcoefficient.
 7. The video coding method according to claim 6, whereinwhen the next key frame uses forward error correction coding, the presetadjusting coefficient is 1/(1+R), wherein R represents a redundancy rateof forward error correction coding; and when the next key frame does notuse forward error correction coding, the preset adjusting coefficientis
 1. 8. The video coding method according to claim 6, wherein theobtaining a load redundancy of a current network, comprises: obtainingdelay information of a historical key frame; and determining the loadredundancy of the current network according to the delay information. 9.The video coding method according to claim 8, wherein the obtainingdelay information of a historical key frame, comprises: using delayinformation fed back by a receiving end as the delay information of thehistorical key frame, or using delay information obtained viamonitoring, of clearing transmitting cache region as the delayinformation of the historical key frame.
 10. The video coding methodaccording to claim 8, wherein the determining the load redundancy of thecurrent network according to the delay information, comprises: settingan initial load redundancy; lowering the load redundancy according to afirst step length when a time window of the delay information is greaterthan a time window of a delay, and using a final load redundancyobtained after adjustment as the load redundancy of the current network;and increasing the load redundancy according to a second step lengthwhen the time window of the delay information is less than the timewindow of the delay, and using a final load redundancy obtained afteradjustment as the load redundancy of the current network, wherein thefirst step length is greater than the second step length.
 11. The videocoding method according to claim 10, wherein the time window of thepreset delay is determined according to a forward reference frametransmission delay, or is determined according to an empty load networkenvironment test value.
 12. The video coding method according to claim1, wherein the historical time period and a coding moment of the nextkey frame have a sliding time window with a time interval.
 13. Anon-transitory computer-readable medium, storing a computer programthereon, the computer program, when executed by a processor,implementing a video coding method, comprising: obtaining historicalsignal strength information within a historical time period, thehistorical signal strength information representing a video transmissionwireless network signal strength corresponding to each moment of thehistorical time period; predicting strength information of a next keyframe according to the historical signal strength information, thestrength information of the next key frame representing a wirelessnetwork signal strength for transmitting the next key frame; anddetermining a target data volume of the next key frame according to thestrength information of the next key frame, and performing intraframecoding on the next key frame according to the target data volume. 14.The computer-readable medium according to claim 13, wherein thedetermining a target data volume of the next key frame according to thestrength information of the next key frame, comprises: determining amodulation and coding scheme of the next key frame according to thestrength information of the next key frame; calculating a data volume ofthe next key frame according to the modulation and coding scheme of thenext key frame; and determining the target data volume of the next keyframe according to comparison of the calculated data volume with anactual data volume.
 15. The computer-readable medium according to claim14, wherein the determining a modulation and coding scheme of the nextkey frame according to the strength information of the next key frame,comprises: obtaining a mapping relationship table of modulation andcoding schemes and strength information; and determining the modulationand coding scheme of the next key frame by looking up the mappingrelationship table of the modulation and coding schemes and the strengthinformation according to the strength information of the next key frame.16. The computer-readable medium according to claim 15, wherein theobtaining a mapping relationship table of modulation and coding schemesand strength information, comprises: obtaining historical modulation andcoding schemes allocated by a base station and the historical signalstrength information in real time, and using coded informationcorresponding to the historical modulation and coding schemes as aclassification label, the historical modulation and coding schemesrepresenting modulation and coding schemes corresponding to historicalmoments; clustering the historical signal strength information accordingto the coded information classification label to obtain a clusteringclassifier; and inputting strength values in a historical signalstrength information value distribution interval into the clusteringclassifier to obtain classification information corresponding to thecoded information classification label to obtain the mappingrelationship table of the modulation and coding schemes and the strengthinformation.
 17. The computer-readable medium according to claim 14,wherein the determining the target data volume of the next key frameaccording to comparison of the calculated data volume with an actualdata volume, comprises: adjusting the calculated data volume; andcomparing the adjusted data volume with the actual data volume, andselecting a data volume with a smaller value as the target data volumeof the next key frame.
 18. An electronic device, comprising: aprocessor; and a memory, configured to store executable instructions ofthe processor; the processor being configured to execute a video codingmethod, comprising: obtaining historical signal strength informationwithin a historical time period, the historical signal strengthinformation representing a video transmission wireless network signalstrength corresponding to each moment of the historical time period;predicting strength information of a next key frame according to thehistorical signal strength information, the strength information of thenext key frame representing a wireless network signal strength fortransmitting the next key frame; and determining a target data volume ofthe next key frame according to the strength information of the next keyframe, and performing intraframe coding on the next key frame accordingto the target data volume.
 19. The electronic device according to claim18, wherein the determining a target data volume of the next key frameaccording to the strength information of the next key frame, comprises:determining a modulation and coding scheme of the next key frameaccording to the strength information of the next key frame; calculatinga data volume of the next key frame according to the modulation andcoding scheme of the next key frame; and determining the target datavolume of the next key frame according to comparison of the calculateddata volume with an actual data volume.
 20. The electronic deviceaccording to claim 19, wherein the determining a modulation and codingscheme of the next key frame according to the strength information ofthe next key frame, comprises: obtaining a mapping relationship table ofmodulation and coding schemes and strength information; and determiningthe modulation and coding scheme of the next key frame by looking up themapping relationship table of the modulation and coding schemes and thestrength information according to the strength information of the nextkey frame.